package com.example.chengww.myone.fragment;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.chengww.myone.R;

/**
 * A simple {@link Fragment} subclass.
 */
public class MusicFragment extends LazyFragment {

    // 标志位，标志已经初始化完成。
    private boolean isPrepared;

    public MusicFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        isPrepared = true;
        lazyLoad();
        return inflater.inflate(R.layout.fragment_music, container, false);
    }

    @Override
    protected void lazyLoad() {
        if(!isPrepared || !isVisible) {
            return;
        }
        //填充各控件的数据
    }
}
